package com.ssm.curd.service.impl;

import com.ssm.curd.bean.Department;
import com.ssm.curd.dao.DepartmentMapper;
import com.ssm.curd.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * DeptService
 *
 * @author zjl
 * @date 2019/12/5
 */
@Service
public class DepartmentServiceImpl implements DepartmentService {

    private final DepartmentMapper departmentMapper;

    @Autowired
    public DepartmentServiceImpl(DepartmentMapper departmentMapper) {
        this.departmentMapper = departmentMapper;
    }

    /**
     * 查询全部
     * @return
     */
    public List<Department> getAll() {
        return departmentMapper.selectAll();
    }
}
